/* @INLINE FILE sounds.bloc.js =============================================================
	* Sound functions
	* 
	* VAR
	* sounds - record for sound info
	* 
	* FUNC
	* plySnd - play a sound
	* this.createSounds -  wrapper for mksounds
	* this.mkSounds - init the sounds
	* this.setSounds - toggle the sounds
	*/
    var sounds = {
    		on:0,
    		a : [1,1,1,1],
			init:0
    };
    var plySnd = function(n){
    	if(chat_layout==1&&n!=1)return;
    	try{
    		if(sounds.on==1&&sounds.a[n]==1){
    			jQ('#fc_sounds').fc_play(n);
    		}
    	}catch(e){}
    };
    this.createSounds = function(){
    	setTimeout("fc_chat.mkSounds()",250);

    };
    this.mkSounds = function(){
    	jQ("#fc_sounds").fc_createSound("../html/sounds/chatroommessagealert.mp3");
    	jQ("#fc_sounds").fc_createSound("../html/sounds/privatemessagealert.mp3");
    	jQ("#fc_sounds").fc_createSound("../html/sounds/enterroomalert.mp3");
    	jQ("#fc_sounds").fc_createSound("../html/sounds/leavingroomalert.mp3");
    };
    this.setSounds = function(index,on){
    	if(index!=null){
    		sounds.a[index]=(sounds.a[index]==1?0:1);
    		put_cdata(sounds.a[index],index+2);
    	}
    	if(on!=null){
    		sounds.on=on;
    		put_cdata(sounds.on,1);
    	}
    };
    
    //sounds.bloc.js =============================================================@END FILE*/